package com.atguigu.tingshu.payment.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.model.payment.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wechat.pay.java.service.payments.model.Transaction;

public interface PaymentInfoService extends IService<PaymentInfo> {

    /**
     * 保存支付交易记录
     * @param orderInfo
     * @param paymentType
     * @param orderNo
     */
    PaymentInfo savePaymentInfo(OrderInfo orderInfo, String paymentType,String orderNo);

    /**
     * 修改交易记录
     * @param result
     */
    void updatePaymentStatus(Transaction result);

    /**
     * 修改交易记录信息
     * @param orderNo
     * @return
     */
    boolean closePayment(String orderNo);


}
